import { createRouter, createWebHistory } from 'vue-router'
import homeView from '@/views/userView/homeView.vue'
import userLoginView from '@/views/userView/userLoginView.vue'
import userInfoView from '@/views/userView/userInfoView.vue'
import orderView from '@/views/userView/orderView.vue'
import cartView from '@/views/userView/cartView.vue'
import userRegisterView from '@/views/userView/userRegisterView.vue'
import payView from '@/views/userView/payView.vue'
import admerLoginView from '@/views/admerView/admerLoginView.vue'
import admerHomeView from '@/views/admerView/admerHomeView.vue'
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/home",
      component: homeView,
    },
    {
      path: '/',
      redirect: '/home'
    },
    {
      path: '/order',
      component: orderView
    },
    {
      path: '/userInfo',
      component: userInfoView
    },
    {
      path: '/userLogin',
      component: userLoginView
    },
    {
      path: '/cart',
      component: cartView
    },
    {
      path: '/userRegister',
      component: userRegisterView
    },
    {
      path: '/pay',
      component: payView
    },
    {
      path: '/admerLogin',
      component: admerLoginView
    },
    {
      path: '/admerHome',
      component: admerHomeView,
    }


  ]

})

export default router
